package com.atguigu.tingshu.order.service;

import com.atguigu.tingshu.model.order.OrderInfo;
import com.atguigu.tingshu.vo.order.OrderInfoVo;
import com.atguigu.tingshu.vo.order.TradeVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;

public interface OrderInfoService extends IService<OrderInfo> {

    /*
     * @description: TODO 订单结算页
     * @author: yyj
     * @date: 2025-02-11
     */
    OrderInfoVo trade(TradeVo tradeVo);

    /*
     * @description: TODO 提交订单
     * @author: yyj
     * @date: 2025-02-11
     */
    Map<String, Object> submitOrder(OrderInfoVo orderInfoVo);


    /*
     * @description: TODO 保存订单
     * @author: yyj
     * @date: 2025-02-11
     */
    OrderInfo  saveOrderInfo(OrderInfoVo orderInfoVo, String orderNo, Long userId);

    /*
     * @description: TODO 初始化消息表
     * @author: yyj
     * @date: 2025-02-11
     */
    void saveLocalMsg(String orderNo);

    /*
     * @description: TODO 支付成功后要对数据进行修改
     * @author: yyj
     * @date: 2025-02-13
    */
    void paySuccess(String orderNo);

    /*
     * @description: TODO 查询订单信息和减免和支付名字和状态信息
     * @author: yyj
     * @date: 2025-02-13
    */
    OrderInfo getOrderInfoAndDetail(String orderNo);

    /*
     * @description: TODO  用户订单分页查询
     * @author: yyj
     * @date: 2025-02-13
    */
    IPage<OrderInfo> findUserPage(IPage<OrderInfo> orderInfoPage, Long userId);
}
